package dletc.job;

import java.util.Scanner;

public class Test05 {

	public static void main(String[] args) {
		
		Scanner s = new Scanner(System.in);
		System.out.print("请输入父字符串：");
		String str = s.next();
		System.out.print("请输入子字符串：");
		String str2 = s.next();

	}
	
	public static void del(String str,String str2){
		
		//删除字符串 将str替换成 ""
		String replace = str.replace(str2, "");
		
		//删除了几份字符串   为什么除 是因为有可以会有重复 比如aaa22bbb22ccc22 删除22  是删除了3次
		int count = (str.length() - replace.length()) / str2.length();
		
		System.out.println("总共删除了：" + count);
	}

}
